#include <chrono>
#include <cstdint>
#include <iostream>
#include <istream>
#include <random>
using ll = int64_t;

std::mt19937 mt (time(nullptr));
std::uniform_int_distribution<ll> un(1,2e6);

int main(){
    std::iostream::sync_with_stdio(false);
    std::cin.tie(nullptr);
    ll n = un(mt);
    std::cout<<n<<"\n";
    for(ll i=1;i<=n;i++){
        std::cout<<un(mt)<<" ";
    }
    std::cout<<"\n";
    for(ll i=1;i<=n;i++){
        std::cout<<un(mt)<<" ";
    }
    std::cout<<"\n";
}